# 构建方法
# docker build --build-arg user=${USER} --build-arg password="shuchengm3" -t ubuntu20_string:latest -f build_for_user.dockerfile .
#

FROM ubuntu:jammy

ARG user
ARG password

LABEL maintainer="zhaoshucheng"
LABEL email="bmwshucheng@126.com"

RUN apt-get update && apt-get upgrade
RUN apt-get update && apt-get install -y sudo

RUN useradd --create-home --no-log-init --shell /bin/bash ${user} \
    && adduser ${user} sudo \
    && echo "${user}:${password}" | chpasswd

WORKDIR /home/${user}

USER ${user}

